<?php
class View 
{ 
	private $str;
	private $user;
	private $tags;
	private $error = '';
	private $autors;
	private $articles;
	private $karma;
	private $comments;
	
	public function setRenderTemplate($str) { 
		$this->str = $str;
        //TODO: Проверить на наличие файла шаблона
	} 
	function setArticles($articles) {
		$this->articles = $articles;
	}
	function setAutors($autors) {
		$this->autors = $autors;
	}
	public function setUser($user) {
		$this->user = $user;
	}
	public function setKarma($karma) {
		$this->karma = $karma;
	}
	
	public function render() { 
		include($this->str); 
	}
	
	public function setError($error) {
		$this->error = $error;
	}
	public function setComments($comments) {
		$this->comments = $comments;
	}
	public function getError() {
		return $this->error;
	}
	public function setTags($tags) {
		$this->tags = $tags;
	}
	public function getNameUser() {
		return $this->user->getName();
	}
	public function getIdUser() {
		return $this->user->getId();
	}
	public function getKarma() {
		return $this->karma;
	}
}
